package com.sanq.product.cab;

import com.sanq.product.cab.basic.Response;
import com.sanq.product.cab.exceptions.BusException;
import com.sanq.product.cab.tools.copy.BeanCopyUtils;
import com.sanq.product.cab.tools.copy.interfaces.BeanCopyCallback;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        System.out.println( "Hello World!" );

        Response res1 = new Response();

        res1.setData(1243);

        Response res2 = new Response();

        try {

            BeanCopyCallback<Response, Response> stBeanCopyCallback = (s, t) -> {
                t.setData(23456);
            };
            BeanCopyUtils.copyProperties(res1, res2, stBeanCopyCallback);

            System.out.println(res2.getData());
        } catch (BusException e) {
            e.printStackTrace();
        }

    }

    public void a () {
    }

}
